<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link
      rel="stylesheet"
      href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
    />
    <style>
      p {
        width: 120px;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <h2>过渡</h2>
      <button @click="show = !show">btn</button>
      <transition
        name="fade"
        enter-active-class="animate__animated animate__bounceIn"
        leave-active-class="animate__animated animate__bounceOutRight"
      >
        <p v-if="show">hello vue!</p>
      </transition>
    </div>

    <script src="./lib/vue3.js"></script>
    <script>
      const { createApp } = Vue;

      const app = createApp({
        data() {
          return {
            show: true,
          };
        },
      });

      app.mount("#app");
    </script>
  </body>
</html>
